{layout layout_main.html}
<?php
$nav_list = Admin::run()->nav_list();
?>
<h3><a href="nav_edit.html" class="actionBtn">添加导航</a>自定义导航栏</h3>
<div class="navList">
	<ul class="tab">
		{loop Admin::run()->nav_category $type}
		<li><a href="nav.html?type={$type}" class="{$_REQUEST['type']==$type||(!$_REQUEST['type']&&$type=='main')?'selected':''}">{ucfirst($type)}</a></li>
		{/loop}
	</ul>
	<table width="100%" border="0" cellpadding="10" cellspacing="0" class="tableBasic">
		<tbody>
			<tr>
				<th width="113" align="center">导航名称</th>
				<th width="113" align="center">上级分类</th>
				<th align="left">链接地址</th>
				<th width="80" align="center">排序</th>
				<th width="120" align="center">操作</th>
			</tr>
			{loop $nav_list $k $v}
			<tr data-id="{$v['id']}">
				<td>{$v['nav_name']}</td>
				<td>{$v['parent_name']?$v['parent_name']:'-'}</td>
				<td>{$v['nav_url']}</td>
				<td align="center">{$v['sort']}</td>
				<td align="center">
					<a href="nav_edit.html?id={$v['id']}">编辑</a> |
					<a href="javascript:;" onclick="delete_row('nav',{$v['id']})">删除</a>
				</td>
			</tr>
			{/loop}
		</tbody>
	</table>
</div>